package com.ruoyi.xuexiao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.xuexiao.domain.entity.ZdKz;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 矿种字典Mapper层
 *
 * @author 齐浩宽
 * @since 2024年5月23日14:51:59
 */
@Mapper
public interface ZdKzMapper extends BaseMapper<ZdKz> {

    /**
     * 分组查询矿种下拉矿字典
     * */
    @Select("SELECT kzdm,kzmc,COUNT(*) FROM zd_kz GROUP BY kzdm,kzmc")
    List<ZdKz> selGrouping();
}
